using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class SEOutStockMap : EntityTypeConfiguration<SEOutStock>
    {
        public SEOutStockMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FBrNo, t.FInterID });

            // Properties
            this.Property(t => t.FBrNo)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FAdd)
                .IsFixedLength()
                .HasMaxLength(255);

            this.Property(t => t.FNote)
                .IsFixedLength()
                .HasMaxLength(255);

            this.Property(t => t.FExplanation)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FFetchAdd)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FPOOrdBillNo)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0236)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0237)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0238)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0240)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0241)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0242)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0243)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0244)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0246)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0250)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0251)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0252)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0253)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0254)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0256)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0258)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfS0255)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("SEOutStock");
            this.Property(t => t.FBrNo).HasColumnName("FBrNo");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FTranType).HasColumnName("FTranType");
            this.Property(t => t.FSalType).HasColumnName("FSalType");
            this.Property(t => t.FCustID).HasColumnName("FCustID");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FStockID).HasColumnName("FStockID");
            this.Property(t => t.FAdd).HasColumnName("FAdd");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FEmpID).HasColumnName("FEmpID");
            this.Property(t => t.FCheckerID).HasColumnName("FCheckerID");
            this.Property(t => t.FBillerID).HasColumnName("FBillerID");
            this.Property(t => t.FManagerID).HasColumnName("FManagerID");
            this.Property(t => t.FClosed).HasColumnName("FClosed");
            this.Property(t => t.FInvoiceClosed).HasColumnName("FInvoiceClosed");
            this.Property(t => t.FBClosed).HasColumnName("FBClosed");
            this.Property(t => t.FDeptID).HasColumnName("FDeptID");
            this.Property(t => t.FSettleID).HasColumnName("FSettleID");
            this.Property(t => t.FTranStatus).HasColumnName("FTranStatus");
            this.Property(t => t.FExchangeRate).HasColumnName("FExchangeRate");
            this.Property(t => t.FCurrencyID).HasColumnName("FCurrencyID");
            this.Property(t => t.FStatus).HasColumnName("FStatus");
            this.Property(t => t.FCancellation).HasColumnName("FCancellation");
            this.Property(t => t.FMultiCheckLevel1).HasColumnName("FMultiCheckLevel1");
            this.Property(t => t.FMultiCheckLevel2).HasColumnName("FMultiCheckLevel2");
            this.Property(t => t.FMultiCheckLevel3).HasColumnName("FMultiCheckLevel3");
            this.Property(t => t.FMultiCheckLevel4).HasColumnName("FMultiCheckLevel4");
            this.Property(t => t.FMultiCheckLevel5).HasColumnName("FMultiCheckLevel5");
            this.Property(t => t.FMultiCheckLevel6).HasColumnName("FMultiCheckLevel6");
            this.Property(t => t.FMultiCheckDate1).HasColumnName("FMultiCheckDate1");
            this.Property(t => t.FMultiCheckDate2).HasColumnName("FMultiCheckDate2");
            this.Property(t => t.FMultiCheckDate3).HasColumnName("FMultiCheckDate3");
            this.Property(t => t.FMultiCheckDate4).HasColumnName("FMultiCheckDate4");
            this.Property(t => t.FMultiCheckDate5).HasColumnName("FMultiCheckDate5");
            this.Property(t => t.FMultiCheckDate6).HasColumnName("FMultiCheckDate6");
            this.Property(t => t.FCurCheckLevel).HasColumnName("FCurCheckLevel");
            this.Property(t => t.FRelateBrID).HasColumnName("FRelateBrID");
            this.Property(t => t.FCheckDate).HasColumnName("FCheckDate");
            this.Property(t => t.FExplanation).HasColumnName("FExplanation");
            this.Property(t => t.FFetchAdd).HasColumnName("FFetchAdd");
            this.Property(t => t.FSelTranType).HasColumnName("FSelTranType");
            this.Property(t => t.FChildren).HasColumnName("FChildren");
            this.Property(t => t.FBrID).HasColumnName("FBrID");
            this.Property(t => t.FAreaPS).HasColumnName("FAreaPS");
            this.Property(t => t.FPOOrdBillNo).HasColumnName("FPOOrdBillNo");
            this.Property(t => t.FManageType).HasColumnName("FManageType");
            this.Property(t => t.FHeadSelfS0236).HasColumnName("FHeadSelfS0236");
            this.Property(t => t.FHeadSelfS0237).HasColumnName("FHeadSelfS0237");
            this.Property(t => t.FHeadSelfS0238).HasColumnName("FHeadSelfS0238");
            this.Property(t => t.FHeadSelfS0239).HasColumnName("FHeadSelfS0239");
            this.Property(t => t.FHeadSelfS0240).HasColumnName("FHeadSelfS0240");
            this.Property(t => t.FHeadSelfS0241).HasColumnName("FHeadSelfS0241");
            this.Property(t => t.FHeadSelfS0242).HasColumnName("FHeadSelfS0242");
            this.Property(t => t.FHeadSelfS0243).HasColumnName("FHeadSelfS0243");
            this.Property(t => t.FHeadSelfS0244).HasColumnName("FHeadSelfS0244");
            this.Property(t => t.FHeadSelfS0245).HasColumnName("FHeadSelfS0245");
            this.Property(t => t.FHeadSelfS0246).HasColumnName("FHeadSelfS0246");
            this.Property(t => t.FHeadSelfS0250).HasColumnName("FHeadSelfS0250");
            this.Property(t => t.FHeadSelfS0251).HasColumnName("FHeadSelfS0251");
            this.Property(t => t.FHeadSelfS0252).HasColumnName("FHeadSelfS0252");
            this.Property(t => t.FHeadSelfS0253).HasColumnName("FHeadSelfS0253");
            this.Property(t => t.FHeadSelfS0254).HasColumnName("FHeadSelfS0254");
            this.Property(t => t.FHeadSelfS0256).HasColumnName("FHeadSelfS0256");
            this.Property(t => t.FHeadSelfS0257).HasColumnName("FHeadSelfS0257");
            this.Property(t => t.FHeadSelfS0258).HasColumnName("FHeadSelfS0258");
            this.Property(t => t.FHeadSelfS0255).HasColumnName("FHeadSelfS0255");
        }
    }
}
